package com.wangp.springbootsource.stopwatch;

import javax.annotation.PostConstruct;
import org.springframework.stereotype.Component;

/**
 * <pre>
 * classname MyStopWatch
 * description
 * </pre>
 *
 * @author wangp
 * @date 2020/9/22 20:36
 **/
@Component
public class MyStopWatch {

    @PostConstruct
    public void stopWatch() throws InterruptedException {
//        StopWatch myWatch = new StopWatch();
//        myWatch.start("task1");
//        Thread.sleep(2000);
//        myWatch.stop();
//        myWatch.start("task2");
//        Thread.sleep(3000);
//        myWatch.stop();
//        myWatch.start("task3");
//        Thread.sleep(1000);
//        myWatch.stop();
//        System.out.println(myWatch.prettyPrint());
    }
}
